/*
 * 项目名称:    wms-server-jeecg
 * 创建人员:    DongPeng
 * 创建时间:    2023-09-21
 * copyright(c) 2022 无锡星智数服科技有限公司
 */
package org.jeecg.modules.dock.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.dock.entity.dto.request.BaseRequestDTO;
import org.jeecg.modules.dock.entity.dto.request.HZJReturnBucketRequest;
import org.jeecg.modules.dock.entity.dto.request.ZJCallBucketRequest;
import org.jeecg.modules.dock.entity.ems.response.EmsBaseResponseVO;
import org.jeecg.modules.dock.service.EmsDockingRepeaterService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 内部对接ems调用
 *
 * @author DongPeng
 * @version 1.0.0
 * @date 2023-09-21
 * @description 类描述
 */
@Slf4j
@RestController
@RequestMapping("ems/repeater")
@RequiredArgsConstructor
@Api(tags = "ems业务调用模块")
public class EmsDockingRepeaterController {

    private final EmsDockingRepeaterService emsDockingRepeaterService;

    /**
     * EMS纵剪叫纸筒
     * 
     * @author DongPeng
     * @date 2023/10/5 9:57
     * @param request
     * @return void
     */
    @ApiOperation(value = "EMS纵剪叫纸筒", notes = "EMS纵剪叫纸筒")
    @PostMapping("/zjCallBucket")
    public EmsBaseResponseVO zjCallBucket(@RequestBody ZJCallBucketRequest request) {
        return emsDockingRepeaterService.zjCallBucket(request);
    }

    /**
     * EMS横剪/纵剪退纸筒
     *
     * @author DongPeng
     * @date 2023/10/5 10:03
     * @param request
     * @return void
     */
    @ApiOperation(value = "EMS横剪/纵剪退纸筒", notes = "EMS横剪/纵剪退纸筒")
    @PostMapping("/hzjReturnBucket")
    public EmsBaseResponseVO hzjReturnBucket(@RequestBody HZJReturnBucketRequest request) {
        return emsDockingRepeaterService.hzjReturnBucket(request);
    }

    /**
     * EMS强制完成
     *
     * @author DongPeng
     * @date 2023/10/5 10:03
     * @param request
     * @return void
     */
    @ApiOperation(value = "EMS强制完成", notes = "EMS强制完成")
    @PostMapping("/forceFinish")
    public EmsBaseResponseVO forceFinish(@RequestBody BaseRequestDTO request) {
        return emsDockingRepeaterService.forceFinish(request);
    }
}
